package com.unione.map.view.viewmodel

import androidx.lifecycle.MutableLiveData
import com.unione.unione_protocol.UnioneRobotRepository
import com.unione.unione_protocol.robot_auto.bean.MapInfo
import com.unione.unione_protocol.robot_auto.ext.handleRobotRequest
import com.unione.unione_protocol.robot_auto.ext.launch


class EditMapStep1ViewModel : CommonVoiceModel() {

    val liveDataMapList = MutableLiveData<List<MapInfo>>()


    fun getMapList() {
        val mapList = mutableListOf<MapInfo>()
        mapList.add(MapInfo("aaaaa", "2024-2-20"))
        mapList.add(MapInfo("bbbbb", "2024-2-21"))
        mapList.add(MapInfo("ccccc", "2024-2-22"))
        liveDataMapList.value=mapList

//        launch({
//            handleRobotRequest(UnioneRobotRepository.getMapList(), successBlock = {
//                if (it.result != null) {
//                    liveDataMapList.value = it.result!!
//                }
//            })
//        })
    }

}